package com.ruoyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 校区对象 campus
 * 
 * @author dam
 * @date 2023-07-12
 */
@Data
public class Campus {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 逻辑删除 0：未删除 1：已删除
     */
    @Excel(name = "逻辑删除 0：未删除 1：已删除")
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 所在省 */
    @Excel(name = "所在省")
    private Long provinceId;

    /** 所在市 */
    @Excel(name = "所在市")
    private Long cityId;

    /** 所在区 */
    @Excel(name = "所在区")
    private Long regionId;

    /** 详细地址 */
    @Excel(name = "详细地址")
    private String address;

    /** 学校 */
    @Excel(name = "学校")
    private Long schoolId;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .append("name", getName())
            .append("provinceId", getProvinceId())
            .append("cityId", getCityId())
            .append("regionId", getRegionId())
            .append("address", getAddress())
            .append("schoolId", getSchoolId())
            .toString();
    }
}
